<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <title>CSS动画</title>
    <style type="text/css">
        .con {
            width: 300px;
            height: 300px;
            background-color: black;
            position: relative;
        }

        .con > div {
            width: 80px;
            height: 80px;
            position: absolute;
            /* 盒子居中 */
            top: 110px;
            left: 110px;
        }

        /* 追加圆点 */
        .con span {
            position: absolute;
            width: 100%;
            height: 100%;
            -webkit-animation: my 5s infinite;
            opacity: 0;
        }

        .con span:after {
            content: '';
            display: inline-block;
            width: 6px;
            height: 6px;
            background-color: white;
            border-radius: 3px;
        }

        @keyframes my {
            0% {
                -webkit-transform: rotate(225deg);
                -webkit-animation-timing-function: ease-out;
                opacity: 1;
            }

            10% {
                -webkit-transform: rotate(360deg);
                opacity: 1;
            }

            30% {
                -webkit-transform: rotate(450deg);
                -webkit-animation-timing-function: ease-in-out;
                opacity: 1;
            }

            50% {
                -webkit-transform: rotate(720deg);
                -webkit-animation-timing-function: linear;
                opacity: 1;
            }

            70% {
                -webkit-transform: rotate(810deg);
                opacity: 1;
            }

            80% {
                -webkit-transform: rotate(945deg);
                -webkit-animation-timing-function: ease-in;
                opacity: 1;
            }

            81% {
                -webkit-transform: rotate(945deg);
                opacity: 0;
            }

            100% {
                -webkit-transform: rotate(945deg);
                opacity: 0;
            }
        }

        /* 五个span延迟显示 */
        .con span:nth-child(1) {
            -webkit-animation-delay: 0.2s;
        }

        .con span:nth-child(2) {
            -webkit-animation-delay: 0.4s;
        }

        .con span:nth-child(3) {
            -webkit-animation-delay: 0.6s;
        }

        .con span:nth-child(4) {
            -webkit-animation-delay: 0.8s;
        }

        .con span:nth-child(5) {
            -webkit-animation-delay: 1s;
        }
    </style>
</head>
<body>
<div class="con">
    <div>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
        <span></span>
    </div>
</div>
</body>
</html>